package com.nciae.po;

import com.baomidou.mybatisplus.annotation.TableField;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author Guoliyu
 * @since 2022-03-30
 */
public class TeacherSignIn implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 经度
     */
    private String longitude;

    /**
     * 纬度
     */
    private String latitude;

    /**
     * 打卡时间
     */
    private Date punchTime;

    @TableField(exist = false)
    private String punchTimeString;

    /**
     * 教师主键
     */
    private Long teacherId;

    /**
     * 定位名称
     */
    private String locationName;

    /**
     * 逻辑删除
     */
    private String isDeleted;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }
    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public Date getPunchTime() {
        return punchTime;
    }

    public void setPunchTime(Date punchTime) {
        this.punchTime = punchTime;
    }

    public Long getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(Long teacherId) {
        this.teacherId = teacherId;
    }
    public String getLocationName() {
        return locationName;
    }

    public void setLocationName(String locationName) {
        this.locationName = locationName;
    }
    public String getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(String isDeleted) {
        this.isDeleted = isDeleted;
    }

    public String getPunchTimeString() {
        return punchTimeString;
    }

    public void setPunchTimeString(Date date) {
        DateFormat df = new SimpleDateFormat("yyyy年MM月dd日");
        this.punchTimeString = df.format(date);
    }

    @Override
    public String toString() {
        return "TeacherSignIn{" +
                "id=" + id +
                ", longitude='" + longitude + '\'' +
                ", latitude='" + latitude + '\'' +
                ", punchTime=" + punchTime +
                ", punchTimeString='" + punchTimeString + '\'' +
                ", teacherId=" + teacherId +
                ", locationName='" + locationName + '\'' +
                ", isDeleted='" + isDeleted + '\'' +
                '}';
    }
}
